package top.hzy520.service;

import top.hzy520.dao.loginDaoImpl;
import top.hzy520.entity.User;


public  class  loginServiceImpl  implements loginService {
    loginDaoImpl loginDao=new loginDaoImpl();

    @Override
    public User login(String username, String password) {
        User user=loginDao.selectUserByUserName(username);
        if (password.equals(user.getPassword())){
            return user;
        }else {
            return null;
        }

    }
}
